package me.thinkjet.controller;

import com.jfinal.core.Controller;
import com.jfinal.ext.route.ControllerBind;
import me.thinkjet.auth.AuthManager;

@ControllerBind(controllerKey = "/", viewPath = "")
public class IndexController extends Controller {
	public void index() {
		for (String role : AuthManager.getSessionUser(this).getRoles()) {
			System.out.println(role);
			if (role.equalsIgnoreCase("ROLE_ADMIN")) {
				setAttr("admin", true);
				break;
			}
		}
	}
}